1 00:00:00,640 --> 00:00:04,180 In order to make a zombie spanner, we're going to need some zombies. 2 00:00:04,180 --> 00:00:07,360 So I'm going to use the roadblock Zombies in the toolbox. 3 00:00:07,480 --> 00:00:08,980 Let's go to our toolbox. 4 00:00:08,980 --> 00:00:16,090 And then with Marketplace selected models right here, we'll say drooling zombie. 5 00:00:16,720 --> 00:00:17,650 There we go. 6 00:00:18,070 --> 00:00:23,980 And here it is, Drooling Zombie by Roblox, marked as a high quality item. 7 00:00:23,980 --> 00:00:25,640 That's what that little shield means. 8 00:00:25,660 --> 00:00:28,880 Let's drag that zombie inside to the workspace. 9 00:00:28,900 --> 00:00:29,800 There we go. 10 00:00:29,950 --> 00:00:32,720 And we get a warning that there's scripts, but that's okay. 11 00:00:32,740 --> 00:00:33,940 It's a roadblock product. 12 00:00:33,940 --> 00:00:37,930 But you should be careful with scripts because people can put bad things in them. 13 00:00:38,090 --> 00:00:39,310 Well, okay. 14 00:00:40,350 --> 00:00:42,120 Go ahead and close the toolbox. 15 00:00:42,150 --> 00:00:44,280 Let's turn our zombie around. 16 00:00:45,120 --> 00:00:45,780 Here we go. 17 00:00:45,780 --> 00:00:54,210 So unsuspecting of the bolder above, right collisions are off so I can duplicate in place control D 18 00:00:54,570 --> 00:00:55,920 and hit the move button. 19 00:00:56,370 --> 00:00:57,870 Drag him out a little bit. 20 00:00:58,560 --> 00:00:59,310 There we go. 21 00:00:59,340 --> 00:01:00,540 Control dx. 22 00:01:00,570 --> 00:01:02,520 Maybe make another one over here. 23 00:01:02,910 --> 00:01:04,800 Control dx to duplicate. 24 00:01:06,500 --> 00:01:09,110 Coup and control day or do one more. 25 00:01:09,140 --> 00:01:11,060 Let's do like five zombies. 26 00:01:12,370 --> 00:01:13,050 Cool. 27 00:01:13,090 --> 00:01:19,660 Now, with those zombies over here in the Explorer, let's select the top one with our mouse shift. 28 00:01:19,660 --> 00:01:21,070 Click the bottom one. 29 00:01:21,070 --> 00:01:22,570 It selects all of them. 30 00:01:22,720 --> 00:01:27,670 I'm going to right click and then group as model or you can do group is folder. 31 00:01:27,670 --> 00:01:30,490 It'll work the same way, but I'm going to do group is model. 32 00:01:30,520 --> 00:01:31,630 Group is model. 33 00:01:32,110 --> 00:01:32,830 Cool. 34 00:01:33,430 --> 00:01:33,760 All right. 35 00:01:33,760 --> 00:01:38,310 I'm going to call this I'll just call it zombies, right? 36 00:01:38,380 --> 00:01:39,010 We've got to be careful. 37 00:01:39,010 --> 00:01:42,130 We don't have too many things with the same name, but I think I'm all right there. 38 00:01:42,760 --> 00:01:43,060 All right. 39 00:01:43,060 --> 00:01:45,160 Now, I don't want them in the workspace. 40 00:01:45,160 --> 00:01:50,470 I'm going to put them in server storage, which is a service that stores things on the server. 41 00:01:50,890 --> 00:01:58,630 I'll hit a plus sign for server storage, add a folder for all of my simple spawning stuff with this 42 00:01:58,630 --> 00:01:59,920 zombie spanner. 43 00:02:00,100 --> 00:02:04,270 I think I'll call this simple Z spanner. 44 00:02:04,270 --> 00:02:07,630 Where's my Z z spanner? 45 00:02:08,260 --> 00:02:09,160 Cool. 46 00:02:09,310 --> 00:02:11,830 Let's get our zombies and drag it down here. 47 00:02:11,830 --> 00:02:16,750 We might have a lot of stuff in server storage, so I'm going to start making folders just to keep things 48 00:02:16,750 --> 00:02:17,560 organized. 49 00:02:17,890 --> 00:02:25,630 Now, we can't we can't run scripts in server storage, but we do have another service that runs scripts 50 00:02:25,630 --> 00:02:28,450 on startup called Server Script Service. 51 00:02:28,570 --> 00:02:30,190 Let's hit this plus sign. 52 00:02:30,190 --> 00:02:34,750 Add a server script, Obviously because it's called server script service. 53 00:02:35,200 --> 00:02:37,630 You can put more than a server script in there though. 54 00:02:38,380 --> 00:02:45,340 Let's call this Z spanner Z spanner. 55 00:02:45,850 --> 00:02:46,600 Cool. 56 00:02:46,630 --> 00:02:51,130 Now we need to spawn those zombies, so we need to get a reference to server storage. 57 00:02:51,130 --> 00:02:52,090 Let's do that. 58 00:02:52,090 --> 00:02:59,170 Local will make a variable called SAS short for server storage equals game. 59 00:02:59,410 --> 00:03:02,440 Get service server storage. 60 00:03:02,710 --> 00:03:03,040 All right. 61 00:03:03,040 --> 00:03:05,950 So this server storage right here is the service. 62 00:03:05,950 --> 00:03:06,940 It's a singleton. 63 00:03:06,940 --> 00:03:08,680 There can only be one, right? 64 00:03:08,680 --> 00:03:11,170 There's only one server storage. 65 00:03:11,170 --> 00:03:13,120 And here's our reference to it. 66 00:03:13,720 --> 00:03:20,320 All right, Now in server storage, we have a folder who is simple Z spanner. 67 00:03:20,320 --> 00:03:22,860 I'll call that S Z s. 68 00:03:22,870 --> 00:03:26,470 This is a short script, so we don't have to be too descriptive of these things. 69 00:03:26,860 --> 00:03:33,250 I'm going to say, assess, wait for child simple Z spanner. 70 00:03:34,420 --> 00:03:42,640 All right, now I need my zombies in SW zs, so I will call this I'll make this more descriptive because 71 00:03:42,640 --> 00:03:47,500 I'm going to use it inside the script Zombie model. 72 00:03:48,010 --> 00:03:48,460 Right. 73 00:03:48,460 --> 00:03:53,410 I'll get my Z's weight for child zombies, right? 74 00:03:53,440 --> 00:03:58,600 That zombie model, I made the variable zombie model so I didn't forget. 75 00:03:59,590 --> 00:04:02,200 All right, now we're going to do a loop. 76 00:04:02,380 --> 00:04:03,990 We can do a while loop, right? 77 00:04:04,000 --> 00:04:06,220 We're going to keep spawning until we turn it off. 78 00:04:06,220 --> 00:04:08,110 Right now, we're not going to be able to turn it off. 79 00:04:08,110 --> 00:04:10,270 We're going to keep this simple for the first video. 80 00:04:10,750 --> 00:04:13,510 I am going to wait a short period of time. 81 00:04:13,510 --> 00:04:15,160 That's going to be like an intermission. 82 00:04:15,640 --> 00:04:17,740 Then I'm going to get my zombies. 83 00:04:17,740 --> 00:04:23,290 This is going to be a clone of the zombie model, right? 84 00:04:23,980 --> 00:04:26,020 We're going to make it an exact clone. 85 00:04:26,020 --> 00:04:28,480 Same place in the world where we created it. 86 00:04:28,480 --> 00:04:33,550 Same number of zombies positioned the same direction, facing the same direction. 87 00:04:33,550 --> 00:04:39,760 So we'll get our zombies and then we'll assign the parent to that zombie model. 88 00:04:41,050 --> 00:04:47,230 The workspace will assign the workspace to As the parent of the zombie model, we have to put it in 89 00:04:47,230 --> 00:04:53,620 the workspace in that way or some descendant of the workspace in order to see the zombies. 90 00:04:54,400 --> 00:04:54,940 Cool. 91 00:04:54,940 --> 00:04:56,050 We'll wait again. 92 00:04:56,050 --> 00:04:57,520 This is going to be the fight time, right? 93 00:04:57,520 --> 00:05:02,950 Maybe make it 25 seconds and then when it's all over and get those zombies, we're going to destroy 94 00:05:02,950 --> 00:05:03,400 them. 95 00:05:03,760 --> 00:05:04,570 Boom! 96 00:05:04,570 --> 00:05:05,290 Dead. 97 00:05:05,710 --> 00:05:06,250 All right. 98 00:05:06,250 --> 00:05:07,810 These are called literals. 99 00:05:07,810 --> 00:05:13,600 When you put the actual number or value of something inside your code, they call it literals, it's 100 00:05:13,600 --> 00:05:15,190 typically frowned upon. 101 00:05:15,190 --> 00:05:17,140 So I'm going to make variables for them. 102 00:05:17,140 --> 00:05:23,830 I'm going to make an intermission variable called five, and then I'm going to make another one called 103 00:05:23,830 --> 00:05:24,820 round. 104 00:05:24,820 --> 00:05:25,150 Right? 105 00:05:25,150 --> 00:05:26,590 That's going to be 25. 106 00:05:26,590 --> 00:05:30,820 So this intermission copy, we'll go right here. 107 00:05:30,850 --> 00:05:33,340 Boom, this round. 108 00:05:34,550 --> 00:05:36,140 It's got to go right there. 109 00:05:36,590 --> 00:05:36,950 Cool. 110 00:05:36,950 --> 00:05:37,580 Let's try it out. 111 00:05:37,580 --> 00:05:39,020 Let's see if we got some zombies. 112 00:05:43,990 --> 00:05:45,700 And it should appear. 113 00:05:45,700 --> 00:05:46,970 Oh, we do have zombies. 114 00:05:46,990 --> 00:05:47,830 All right. 115 00:05:50,780 --> 00:05:52,190 We got all but one. 116 00:05:52,220 --> 00:05:53,370 That's pretty cool. 117 00:05:53,390 --> 00:05:58,560 Now we're going to get more zombies, but this one will disappear, and then we'll get more zombies. 118 00:05:58,580 --> 00:05:59,690 We're going to change that, too. 119 00:05:59,720 --> 00:06:03,050 We're going to do a little more flexibility with things like that. 120 00:06:03,050 --> 00:06:04,790 Let's see if we get another round, though. 121 00:06:04,820 --> 00:06:07,640 I don't want to quit until we know that it's working. 122 00:06:15,860 --> 00:06:16,840 That comes. 123 00:06:16,850 --> 00:06:17,780 I just checked. 124 00:06:17,870 --> 00:06:19,230 Oh, and I have the badge. 125 00:06:19,250 --> 00:06:21,890 We got more zombies, so we know we're up and running. 126 00:06:21,890 --> 00:06:22,100 We're. 127 00:06:22,250 --> 00:06:23,360 We're good to go. 128 00:06:23,360 --> 00:06:28,040 Let's go ahead and prove this zombie thing in our next video.